package com.class05._super.easy;

/**
 * @ClassDescription:
 * @JdkVersion: 17
 * @Author: yxy
 * @Created: 2024/4/9 10:19
 */
//发动机类
public class Engine {
    //    价格
    private double price;
    //    几缸
    public int vat;
    //转速
    protected int speed;
    //电量
    int quantity;
//    alt + insert 快捷键

    //全参构造函数
    public Engine(double price, int vat, int speed, int quantity) {
        this.price = price;
        this.vat = vat;
        this.speed = speed;
        this.quantity = quantity;
    }

    public Engine() {
    }

    //    有参数有返回值
    public int powerShow(int power) {
        System.out.println("发动机动力为：" + power);
        return power;
    }

    //展示电量
    public void showQuantity() {
        System.out.println("发动机电量为：" + this.quantity);
    }

}
